![]() |
PATH![]() |
![]() ![]() |
The class identifier Number is a synonym for Integer or Real; it describes a positive or negative number that can be either of class Integer or of class Real.
1
2
-1
1000
10.2579432
1.0
1.
Any valid literal expression for an Integer or a Real value is also a valid literal expression for a Number value.
Because values identified as values of class Number are really values of either class Integer or class Real, the operators available are the operators described in the definitions of the Integer or Real value classes.
You can use the class identifier Number to coerce any value that can be coerced to a Real value or an Integer value. However, the resulting value class is always either Integer or Real:
set x to 1.5 as number
class of x --result: real